X coordinate index out of bounds